package lang;

public class Order {

    private double discount;

    private OrderType orderType;

    public double getDiscount() {
        return discount;
    }

    public void setDiscount(double discount) {
        this.discount = discount;
    }

    public OrderType getOrderType() {
        return orderType;
    }

    public void setOrderType(OrderType orderType) {
        this.orderType = orderType;
    }

    @Override
    public String toString() {
        return "Order{" +
                "discount=" + discount +
                ", orderType=" + orderType +
                '}';
    }

    public  void foo2() {
        System.out.println("order-foo2");
    }

    public synchronized void foo() {
        System.out.println("order-foo-synchronized");
//        Thread thread = new Thread(new Runnable() {
//            @Override
//            public void run() {
//                System.out.println("thread");
//            }
//        });
//        thread.start();
    }
}
